﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
    <div id="cc1" style="background-color:green;width:60px;height:25px;margin:5px;"></div>
    <div id="cc2" style="background-color:green;width:60px;height:25px;margin:5px;"></div>
    <div id="cc3" style="background-color:green;width:60px;height:25px;margin:5px;"></div>
    <div id="cc4" style="background-color:green;width:60px;height:25px;margin:5px;" onclick="$( '#cc2' ).dblclick()"></div>
    <div id="cc5" style="background-color:green;width:60px;height:25px;margin:5px;" onclick="$( '#cc2' ).trigger('dblclick')"></div>
    <script>
        !function () {
            $('#cc1').dblclick(function (event) {
                alert(JSON.stringify(event));
            });
            $('#cc2').dblclick({ name: 'tom', age: '15' }, function (event) {
                alert(JSON.stringify(event.data));
            });
            $('#cc3').on('dblclick', function () {
                alert("双击了下");
                $(this).off('dblclick');
            });
        }();
    </script>
</body>
</html>